﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RegisterationCommon.Common;
using System.Data;
using RegisterationCommon.Student;
using RegisterationCommon.Education;
using System.IO;

namespace RegisterationSystem.Space_Education
{
	public partial class studentinfo_contrast : System.Web.UI.Page
	{
        public string ShcJson = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dt = new DataTable();
                
                if (Request.Form["action"] != "")
                {
                    switch (Request.Form["action"])
                    {
                        case "pswdreset":
                            UpdStudentPswdReset();
                            break;
                        //case "derive_excelList":
                        //    derive_excelList();
                        //    break;
                        //case "derive_excelListAll":
                        //    derive_excelListAll();
                        //    break;
                    }
                }
                ShcJson = BaseLibrary.GetSclJson();
                // Bind();
            }
        }
        //绑定学校
        //void Bind()
        //{
        //    DataTable dt = DBAction.GetDTFromSQL("select * from SchoolInfo");
        //    DataRow[] drs = dt.Select();
        //    ddlSchoolInfo.Items.Add(new ListItem("全部", "99"));
        //    foreach (DataRow dr in drs)
        //    {
        //        ListItem item = new ListItem();
        //        item.Text += dr["Name"].ToString();
        //        item.Value = dr["id"].ToString();
        //        ddlSchoolInfo.Items.Add(item);
        //    }
        //}
        //根据id重置学生帐号密码
        void UpdStudentPswdReset()
        {
            string id = Request.Form["id"].ToString();
            string StudentPswd = Request.Form["StudentPswd"].ToString();
            StudentInfo s = new StudentInfo();
            s.MdfAccountPwd(Convert.ToInt64(id), BaseLibrary.ConvertToMD5(StudentPswd.ToLower()));
        }
    }
}